# $Id$
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: Tobias Kieslich tobias [funnychar] archlinux org
# Contributor: see .contrib

pkgname=aubio
pkgver=0.4.2
pkgrel=2
pkgdesc="A tool for extracting annotations from audio signals"
arch=('i686' 'x86_64')
url="http://aubio.org/"
license=('GPL')
depends=('fftw' 'jack' 'ffmpeg')
makedepends=('python2-numpy' 'python2-setuptools')
optdepends=('python2-numpy: Python 2.x interface')
source=("http://aubio.org/pub/$pkgname-$pkgver.tar.bz2")
md5sums=('c0f6d8355e92669722501c3a762ba548')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"

  # python2 compat (for python interface)
  sed -i 's:bin/env python:bin/env python2:' \
      "$srcdir/$pkgname-$pkgver/python/lib/aubio/__init__.py"
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

  python2 waf configure --prefix=/usr --enable-fftw3f --libdir=/usr/lib
  python2 waf build $MAKEFLAGS
  (cd python && python2 setup.py build) # python interface
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  python2 waf --destdir="$pkgdir" install

  # python interface
  (cd python && python2 setup.py install --root="$pkgdir" --optimize=1)
}

# vim:set ts=2 sw=2 et:
